package org.p2psimulator.factory.idfactory;

import org.p2psimulator.entity.Id;
import org.p2psimulator.entity.id.DoubleId;

public class TransactionIdFactory extends IdFactory {

	public TransactionIdFactory(int space) {
		super(space);

	}

	public TransactionIdFactory() {
		super(0);

	}
	static double cnt = 1;

	@Override
	public Id<Double> generate() {

		Id<Double> id = new DoubleId(cnt);
		cnt++;
		return id;
	}
	public Id<Double> generateInvalidId(){
		return new DoubleId(-1.0);
	}

}
